package com.xcjh.opencv.rule.qianshou;

import com.xcjh.opencv.ExeRule;
import com.xcjh.opencv.emuns.MatchImage;
import com.xcjh.opencv.rule.BaseRule;
import org.springframework.stereotype.Component;

import java.awt.*;
import java.util.Random;

@Component
public class Qianshou implements BaseRule {
    @Override
    public String getRuleName() {
        return "牵手";
    }

    Random random=new Random();
    @Override
    public void run(Robot robot) throws Exception {
        ExeRule.delayByRobot(2000,robot);
        if(random.nextInt(30)>=29){
            findAndClickPic(MatchImage.牵手不喜欢, robot);
            ExeRule.moveToByRobot(1,1,robot);
        }else{
            findAndClickPic(MatchImage.牵手喜欢, robot);
            ExeRule.moveToByRobot(1,1,robot);
        }


    }

}
